package cn.wolfcode.controller;

import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author jishushen
 * @create 2021-02-18 14:32
 * 错误的controller:由他转发到真正的错误页面(如 404.ftl)
 */
@Api(value = "错误的接口",description = "error资源控制器")
@Controller
@RequestMapping("/error")
public class ErrorController {

    //404错误的url
    @GetMapping("/error404Page")
    public String error404Page(){
       return "error/404";
    }

    //没有权限的url
    @GetMapping("/unauthorized")
    public String unauthorized(){
        return "error/nopermission";
    }

    @GetMapping("/error")
    public String runtimeError(){
        return "error/error";
    }
}
